<?php
include_once ('../global.php');

class CApp extends App_Page
{
	private $gid;
	private $gift;
	
	protected function getPara()
    {
        $this->gid = Tool_Input::clean('r', 'gid', 'int');
    }

	protected function checkPara()
    {
        if (empty($this->gid))
        {
        	throw new Exception('common:invalid params');
        }
    }

    protected function main()
    {
    	$this->gift = $this->goods_item->get($this->gid);
    	
        $this->setTitle("Welcome!");
    }

    protected function outputBody()
    {
    	$this->smarty->assign('goodsInfo', $this->list);
        $this->smarty->display("goods/detail.html");
    }
}

$app = new CApp("");
$app->run();
?>